package org.simplextensions.examples.menu;

import org.simplextensions.ui.IApplicationWindow;
import org.simplextensions.ui.menu.*;
import org.simplextensions.ui.menu.annotations.Action;

@Action(id = "action2", parent = ApplicationMenu.FileMenu)
public class FirstApplicationWindowActions extends MenuExtensionAdapter implements IApplicationWindowActions {

	public class InnerFooAction extends ApplicationWindowActionAdapter {

		public boolean isEnabled(MenuExtensionMetadata arg0) {
			return false;
		}

		public void run(MenuExtensionMetadata arg0) {
			System.out.println("action was executed");
		}

	}

	public void init(IApplicationWindow window) {
	}

	public IApplicationWindowAction[] getActions() {
		return new IApplicationWindowAction[] { new InnerFooAction(), new InnerFooAction() };
	}

}
